﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategoryList.ascx.cs" Inherits="Admin_Category_CategoryList" %>
<h2>
    <asp:Label ID="lblTitle" runat="server" Text="Label"></asp:Label>
</h2>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="error" />
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" Display="None"></asp:CustomValidator>
<asp:HiddenField runat="server" ID="hidCatType" />
<asp:HiddenField runat="server" ID="hidLang" Value="vi-VN" />
<table width="100%">  
    <tr>
        <td>
            <asp:Button runat="server" Text = "Thêm" ID = "btnAdd" onclick="btnAdd_Click" ValidationGroup="none" />
        </td>
       
    </tr>
</table>
<table class="table">
    <tr>
        <th width="40px">
            STT
        </th>
        <th>
            Danh mục
        </th>
        <th width="150px">
            Danh mục cha
        </th>
        <th width="50px">
        </th>
    </tr>
    <asp:Repeater ID="rep" runat="server" OnItemCommand="rep_ItemCommand">
        <ItemTemplate>
            <tr>
                <td align="center">
                    <%# Container.ItemIndex +1 %>
                </td>
                <td>
                    <a href='<%#GetDetailLink(Eval("CategoryId")) %>'><%# !string.IsNullOrEmpty(Eval("CatName").ToString())? Eval("CatName"):"Vui lòng nhập..."%></a>
                </td>
                <td>
                    <%--<%# Eval("Parent") %>--%>
                </td>
                <td align="center">
                    <asp:LinkButton ID="del" runat="server" CommandName="del" CommandArgument='<%# Eval("CategoryId") %>'
                        OnClientClick="return confirm('Bạn xác nhận xóa dữ liệu?')" ValidationGroup="del"><img src="../images/delete.png" /></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
    </asp:Repeater>
</table>
